﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;

namespace CommonTypes.Client
{
    public interface IClientToClient
    {
        void BeginReservation(Reservation reservation, ArrayList receivedClients, ArrayList lastClients);

        void ReservationAnswer(ArrayList receivedClients, String clientId, ArrayList availableSlots, long ticket);

        void NotifyTentativelyBooked(String initiatorId, long ticketNumber, long slotNumber, ArrayList lastClients, Reservation reservation);

        void TentativelyBookedAnswer(String clientId, long ticketNumber, long slotNumber, bool answer);

        void VoteCommitRequest(String initiatorId, long ticketNumber, long slotNumber, long transactionTimeout, ArrayList lastClients);

        void CommitRequestAnswer(String clientId, long ticketNumber, long slotNumber, bool answer);

        void VoteDoCommit(String initiatorId, long ticketNumber, long slotNumber, ArrayList lastClients);

        void DoCommitAnswer(String clientId, long ticketNumber, long slotNumber, bool answer);

        void AbortTransaction(String initiatorId, long ticketNumber, long slotNumber, ArrayList lastClients);
    }
}
